package com.moonstar;

import javax.swing.*;

public class myThread5 extends Thread{
    private JTextArea jt;
    int index=0;

    myThread5(JTextArea jt){
        this.jt=jt;
    }

    @Override
    public void run() {
       while (true){
           synchronized (work2.Lock4) {
               jt.setText(String.valueOf(work2.index4));
               work2.index4++;
           }
           try {
               sleep(30);
           } catch (InterruptedException e) {
               e.printStackTrace();
           }
       }
    }
}
